-- GENERATED SPELL FOR [Field Medic Penny] --


function spell0_32897(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(63499,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32897', 651, 1)
end

function spell1_32897(pUnit, Event) --@Greater Heal,Heal--
pUnit:FullCastSpellOnTarget(62809,pUnit)
pUnit:RegisterEvent('Sorts_32897', 1500, 1)
end

function spell2_32897(pUnit, Event) --@Smite,n/a--
pUnit:FullCastSpellOnTarget(61923,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32897', 2000, 1)
end

function Sorts_32897(pUnit, Event)
local choix_sorts_32897 = math.random(0, 2)
if choix_sorts_32897 == 0 then
pUnit:RegisterEvent('spell0_32897', 1, 1)
end
if choix_sorts_32897 == 1 then
pUnit:RegisterEvent('spell1_32897', 1, 1)
end
if choix_sorts_32897 == 2 then
pUnit:RegisterEvent('spell2_32897', 1, 1)
end
end

function mob32897_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32897', math.random(1500, 3000), 1)
end

function mob32897_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32897_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32897_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32897, 1, 'mob32897_Action')
RegisterUnitEvent(32897, 2, 'mob32897_Leave')
RegisterUnitEvent(32897, 3, 'mob32897_Kill')
RegisterUnitEvent(32897, 4, 'mob32897_Die')
